﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;
namespace BPM.Web.Shared.Data;

public partial class AddNoticeInput : BaseVM
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [DisplayName("业务号")]
    [Required(ErrorMessage = "业务号不能为空")]
    [JsonPropertyName("id")]
    public long Id { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    [DisplayName("标题")]
    [JsonPropertyName("title")]
    [Required(ErrorMessage = "标题不能为空")]
    public string? Title { get; set; }

    /// <summary>
    /// 内容
    /// </summary>
    [DisplayName("内容")]
    [JsonPropertyName("content")]
    [Required(ErrorMessage = "内容不能为空")]
    public string? Content { get; set; }

    /// <summary>
    /// 类型（字典 1通知 2公告）
    /// </summary>
    [DisplayName("类型（字典 1通知 2公告）")]
    [JsonPropertyName("type")]
    public NoticeType Type { get; set; } = NoticeType.NOTICE;

    [JsonPropertyName("status")]
    public NoticeStatus Status { get; set; }

    /// <summary>
    /// 通知到的人
    /// </summary>
    [DisplayName("通知到的人")]
    [JsonPropertyName("noticeUserIdList")]
    [Required(ErrorMessage = "通知到的人不能为空")]
    public IEnumerable<string> NoticeUserIdList { get; set; } = Enumerable.Empty<string>();

}
